package com.zhudeshuai.zhudemolist.activity;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.webkit.WebView;
import android.webkit.WebViewClient;

import com.zhudeshuai.zhudemolist.R;

/**
 * @author zhudeshuai
 * @since 16/5/6
 */
public class WebViewTestActivity extends Activity {

    private WebView mWebView;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_web_view_test);
        mWebView = (WebView) findViewById(R.id.webView);
        mWebView.setWebViewClient(new WebViewClient() {
            @Override
            public boolean shouldOverrideUrlLoading(WebView view, String url) {
                view.loadUrl(url);
                return true;
            }
        });

        /*WebSettings settings = mWebView.getSettings();
        settings.setJavaScriptEnabled(true);*/


        mWebView.loadUrl("http://www.nm.10086.cn/housailei.xhtml");


    }

    public static void open(Activity activity) {
        activity.startActivity(new Intent(activity, WebViewTestActivity.class));
    }
}
